<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // 1-增
      var obj = {}
      obj.name = 'cxm'
      obj.age = 23
      obj.location = '安徽'
      console.log(obj)

      // 1-删
      delete obj.name // delete 关键字

      // 1-改
      obj.age = 200

      // 1-查
      document.write('姓名是' + obj.name)

      // 2-增
      var obj2 = {}
      obj2['name'] = 'cxmmmm'
      console.log(obj2)

      // 2-改
      obj2['name'] = 'tuichui'

      // 2-查
      document.write('姓名是' + obj2['name'])

      // 2-删
      delete obj2['name'] // delete 关键字
      console.log(obj2)
    </script>
  </body>
</html>
